package thread.BQ;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

public class LinkedBlockingQueueTest {
	
	public static void main(String[] args) {

		System.out.println("Start of LinkedBlockingQueue >> ");
		BlockingQueue<String> q3   = new LinkedBlockingQueue<String>(1024);
		try {
			q3.put("1");
			q3.put("3");
			q3.put("5");
			q3.put("2");
			q3.put("5");
			System.out.println( q3.take());
			System.out.println( q3.take());
			System.out.println( q3.take());
			System.out.println( q3.take());
			System.out.println( q3.take());
			
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println("End of LinkedBlockingQueue >> ");
	
	}

}
